from typing import Optional

from pydantic import BaseModel

from conf.config import config


class Task(BaseModel):
    content: str = ""  # 正文
    chunk_size:  Optional[int] = config["originality_params"]["chunk_size"]  # 字符串长度达到多少就切断
    k: Optional[int] = config["originality_params"]["k"]  # 选几个句子
    total_page: Optional[int] = config["originality_params"]["total_page"]  # 百度翻几页
    similarity_limit: Optional[int] = config["originality_params"]["similarity_limit"]  # 相似度限值
